<?php
	include "../public/commom/config.php";
	include "../public/commom/commom.php";
?>

<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
		<title>店铺</title>
		<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
		<link rel="stylesheet" type="text/css" href="public/css/index.css"/>
	</head>

	<body>
		<?php
			include "public/commom/header.php";
			
			$sql = "SELECT store.*, area.name aname FROM store LEFT JOIN user ON (store.user_id = user.id) LEFT JOIN area ON (user.area_id = area.id)";
			
			$result = mysqli_query($conn, $sql);
			
			while($row = mysqli_fetch_assoc($result)) {
				?>
				
					<div style="margin-bottom: 5px;" class="store-info">
						<div class="logo">
							<img class="rounded-circle" src="<?php echo $imgPath . $row["logo"]; ?>"/>
						</div>
						<div class="store-content">
							<h1><?php echo $row["name"]; ?></h1>
							<p>销量&nbsp;0</p>
							<span><?php echo $row["aname"]; ?></span>
						</div>
					</div>
				
				<?php
			}
		?>
	</body>

</html>